package com.woniu.liuzhougov.systemSettings.service.impl;

import com.woniu.liuzhougov.systemSettings.dao.LogMapper;
import com.woniu.liuzhougov.systemSettings.dto.LogDto;
import com.woniu.liuzhougov.systemSettings.pojo.Log;
import com.woniu.liuzhougov.systemSettings.service.LogService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class LogServiceImpl implements LogService {

    @Resource
    private LogMapper logMapper;

    @Override
    public List<LogDto> selAll() {
        return logMapper.selAll();
    }

    @Override
    public String insert(Log log) {
        try {
            logMapper.insertSelective(log);
        }catch (Exception e){
            return "false";
        }
        return "success";
    }

    @Override
    public List<LogDto> sellLike(LogDto logDto) {
        return logMapper.selLike(logDto);
    }


}
